/*
	Travis Tarr
	CS362-400
	
	Assignment #3
	
	Testing the fullDeckCount() function
		int fullDeckCount(int player, int card, struct gameState *state) 
		returns the count of given card the player has in each of the piles
	
*/

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

void testFullDeckCount() {
    int i;
	int estate = 2;  // according to the switch statement @ interface.c
	int copper = 5;
    int seed = 1000;
    int numPlayer = 2;
    int maxBonus = 10;
    int p, r, handCount;
    int bonus;
    int k[10] = {adventurer, council_room, feast, gardens, mine
               , remodel, smithy, village, baron, great_hall};
    struct gameState G;
    int maxHandCount = 5;
	int maxCount = 20;
	int testCard = 6;

    printf ("TESTING fullDeckCount():\n");
    for (p = 0; p < numPlayer; p++)
    {

		memset(&G, 23, sizeof(struct gameState));   // clear the game state
		r = initializeGame(numPlayer, k, seed, &G); // initialize a new game
		
		// test for default initialization count (3 estate, 7 copper)
		if(fullDeckCount(p, estate, &G) == 3) {
			printf("fullDeckCount(): PASSED with initial game cards.\n");
		} else {
			printf("fullDeckCount(): FAILED with initial game cards.\n");
		}
		
		if(fullDeckCount(p, copper, &G) == 7) {
			printf("fullDeckCount(): PASSED with initial game cards.\n");
		} else {
			printf("fullDeckCount(): FAILED with initial game cards.\n");
		}

	}
		
}

int main() {
	testFullDeckCount();
	return 0;
}